package 
{
	import com.grouuu.core.Controller;
	import com.grouuu.core.Environment;
	import com.grouuu.loader.LoadMedia;
	import com.grouuu.vo.LoadMediaVO;
	import flash.display.Sprite;
	import flash.events.Event;

	/**
	 * ...
	 * @author Grouuu
	 */
	
	[Frame(factoryClass = "Preloader")]
	[SWF(frameRate = "60", backgroundColor = "#FFFFFF", width = "920", height = "480")]
	
	public class Main extends Sprite 
	{
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(event:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			Environment.init(this);
			
			var controller:Controller = new Controller();
			
			/*var loader:LoadMedia = new LoadMedia();
			
			var vo:LoadMediaVO = new LoadMediaVO();
			vo.url = "xml/config.xml";
			
			loader.loadDocument(vo);*/
		}
	}
}